package com.wfh.picture.service;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wfh.picture.model.dto.space.SpaceAddRequest;
import com.wfh.picture.model.dto.space.SpaceQueryRequest;
import com.wfh.picture.model.entity.Space;
import com.wfh.picture.model.entity.User;
import com.wfh.picture.model.vo.SpaceVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author lenovo
* @description 针对表【space(空间)】的数据库操作Service
* @createDate 2025-05-12 20:49:43
*/
public interface SpaceService extends IService<Space> {


    /**
     * 获取空间封装类
     * @param space
     * @param request
     * @return
     */
    SpaceVO getSpaceVO(Space space, HttpServletRequest request);

    /**
     * 创建空间
     * @param spaceAddRequest
     * @param loginUser
     * @return
     */
    long addSpace(SpaceAddRequest spaceAddRequest, User loginUser);

    /**
     * 校验空间
     * @param space
     * @param add
     */
    void validSpace(Space space, boolean add);

    /**
     * 分页获取空间列表
     * @param spacePage
     * @param request
     * @return
     */
    Page<SpaceVO> getSpaceVOPage(Page<Space> spacePage, HttpServletRequest request);

    /**
     * 获取查询条件
     * @param spaceQueryRequest
     * @return
     */
    LambdaQueryWrapper<Space> getQueryWrapper (SpaceQueryRequest spaceQueryRequest);


    /**
     * 填充空间参数
     * @param space
     */
    void fillParams(Space space);


}
